# @Time  : 2021/7/28 22:12
# @Author: zhanfengzhen
# @Email : zhanfengzhen@126.com
# @File  : add_manuallyPage.py
# !/usr/bin/env python
# -*- coding: UTF-8 -*-
from time import sleep

from appium.webdriver.common.mobileby import MobileBy

from hogwarts.HogwartsHomework.appWork1.po.basePage import BasePage


class AddManuallyPage(BasePage):
    def return_addmenber(self):
        from hogwarts.HogwartsHomework.appWork1.po.add_memberPage import AddMemberPage
        self.driver.find_element(MobileBy.XPATH, '//*[contains(@text, "必填")]').send_keys('APP自动化测试')
        self.driver.find_element(MobileBy.XPATH, '//*[contains(@text, "男")]').click()
        sleep(2)
        self.driver.find_element(MobileBy.XPATH, '//*[contains(@text, "男")]').click()
        self.driver.find_element(MobileBy.XPATH, '//*[contains(@text, "手机号")]').send_keys('13555225584')
        self.driver.find_element(MobileBy.XPATH, '//*[@text="保存"]').click()
        return AddMemberPage(self.driver)